build: Add the appropriate paths in the configuration header
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 18 Apr 2017 13:22:23 +0000 (14:22 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 3 May 2017 14:10:56 +0000 (15:10 +0100)
Instead of injecting them into the C compiler arguments.

config.h.meson
gtk/meson.build
meson.build

index 158907f98f25a5e5b9abb74345007ee54ecbc006..b1f286b9b5b8134c0f97bacdc1be63979c110a92 100644 (file)
 /* Define to 1 if linux/memfd.h exists */
 #mesondefine HAVE_LINUX_MEMFD_H
 
+#mesondefine GTK_SYSCONFDIR
+
 #mesondefine GTK_LOCALEDIR
 
 #mesondefine GTK_DATADIR
index 14c181b4a1c960d72c1b1da39b67e05a7b652cbd..54fe86a2050ac12420772c413693f8942ccaa3d7 100644 (file)
@@ -756,17 +756,16 @@ gtkversion = configure_file(
   input  : 'gtkversion.h.in',
   output : 'gtkversion.h',
   configuration: gtkversion_cdata,
-  install_dir: 'include/gtk-4.0/gtk/'
+  install_dir: 'include/gtk-4.0/gtk'
 )
 
 gtk_cargs = [
   '-DGTK_COMPILATION',
   '-DG_LOG_DOMAIN="Gtk"',
   '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
-  '-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
-  '-DGTK_HOST="' + host_machine.system() + '"',
-  '-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"',
-  '-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
+  '-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version),
+  '-DGTK_HOST="@0@"'.format(host_machine.system()),
+  '-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix),
 ]
 
 gtk_gen_headers = [gtkmarshal_h, gtktypebuiltins_h, gtkprivatetypebuiltins_h, gtkversion]
index 9633d02c91a43633bfb94b6b57c4f968cf8fdd42..fef52f2ca2bbf3c4fe1b44d029a7959935fd52a1 100644 (file)
@@ -81,6 +81,7 @@ gtk_prefix = get_option('prefix')
 gtk_libdir = join_paths(gtk_prefix, get_option('libdir'))
 gtk_datadir = join_paths(gtk_prefix, get_option('datadir'))
 gtk_localedir = join_paths(gtk_prefix, get_option('localedir'))
+gtk_sysconfdir = join_paths(gtk_prefix, get_option('sysconfdir'))
 
 cc = meson.get_compiler('c')
 
@@ -89,6 +90,7 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
 cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir)
 cdata.set_quoted('GTK_DATADIR', gtk_datadir)
 cdata.set_quoted('GTK_LIBDIR', gtk_libdir)
+cdata.set_quoted('GTK_SYSCONFDIR', gtk_sysconfdir)
 cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40')
 cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
 cdata.set('GTK_MINOR_VERSION', gtk_minor_version)